const path = require('path');
function resolve (dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    lintOnSave: true,
    chainWebpack: (config)=>{
        config.resolve.alias
            .set('@$', resolve('src'))
            .set('assets',resolve('src/assets'))
            .set('components',resolve('src/components'))
            .set('layout',resolve('src/layout'))
            .set('base',resolve('src/base'))
            .set('static',resolve('src/static'))
    },
    devServer:{
        port:9527,
        host:'0.0.0.0',
        proxy:{
            '/users':{
                target:'http://106.13.52.4:3000',
                changeOrigin:true,
                // pathRewrite:{ //路径重写
                //     "^/api": ""
                // }
            }
        }
    }
}
